package com.zr.userlogin.mapper;


import com.zr.userlogin.pojo.LoginVo1;
import com.zr.userlogin.pojo.UserLogin;
import com.zr.userlogin.pojo.registerVo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Created by 86151 on 2019/6/14.
 */
@Mapper
public interface UserMapper {

    @Select("select * from userlogin where iphone = #{iphone}")
    List<UserLogin> queryUserByPhone(String iphone);

    @Insert("insert into userlogin (iphone,userPwd,verificationCode,createTime,createName,updateTime,updateName) values (#{iphone},#{userPwd},#{verificationCode},#{createTime},#{createName},#{updateTime},#{updateName})")
    int register(registerVo loginVo);

//    @Select("select * from userlogin where iphone = #{iphone} and verificationCode = #{verificationCode}")
//    UserLogin login(@Param("iphone") Integer iphone,@Param("verificationCode") String verificationCode);

    @Select("select * from userlogin where iphone = #{iphone} and verificationCode = #{verificationCode}")
    UserLogin login(LoginVo1 loginVo1);

    @Select("select * from userlogin where invitationCode = #{invitationCode}")
    UserLogin inputInvitationCode(String invitationCode);
}
